package com.attendance.sz.up.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.math.BigDecimal;

/**
 * 作者：TanTun
 * 时间：2017/3/3
 * 邮箱：32965926@qq.com
 * 描述：钱包信息
 */

public class Bag implements Parcelable {
    private int bagID;
    private String bagName;
    private BigDecimal cardValue;

    protected Bag(Parcel in) {
        bagID = in.readInt();
        bagName = in.readString();
        cardValue = (BigDecimal) in.readSerializable();

    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(bagID);
        dest.writeString(bagName);
        dest.writeSerializable(cardValue);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<Bag> CREATOR = new Creator<Bag>() {
        @Override
        public Bag createFromParcel(Parcel in) {
            return new Bag(in);
        }

        @Override
        public Bag[] newArray(int size) {
            return new Bag[size];
        }
    };

    public BigDecimal getCardValue() {
        return cardValue;
    }

    public void setCardValue(BigDecimal cardValue) {
        this.cardValue = cardValue;
    }

    public int getBagID() {
        return bagID;
    }

    public void setBagID(int bagID) {
        this.bagID = bagID;
    }

    public String getBagName() {
        return bagName;
    }

    public void setBagName(String bagName) {
        this.bagName = bagName;
    }
}
